Skip to main content

Account Information Overview

Quickstart Guide

This document describes how to jump in and connect to the API. This guide will get you started, but you should refer to the API Reference to get all the details.

This assumes you have already registered on our user portal and got your client ID and client secret.

Step 1: Get Access Token

Using your access client ID and client secret exchange these for an access token (ACCESS_TOKEN)

Here you are creating an unauthorised consent, which will be authorised by the service user in the next step.

curl -X POST 'https://monolay.io/v1/ais/consents' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: Bearer ACCESS_TOKEN"
-d '{
"institutionName": "Barclays",
"scope": "Account",
"agreement": {
"maxHistoricalDays": 90,
"accessValidForDays": 90
}
}'

Reply

{
consentID: aaklfgkla53450,
"url": "https://"
}

Step 3. Use the URL

Forward the url returned from step 2 above, you complete the consent journey.

After approval, you will be re-directed back

Using the consent id from step 2, you can check the status of the consent to verify that it has been authorised and is ready to be used.

curl -L 'https://monolay.io/v1/ais/consents/aaklfgkla53450' \
-H 'Accept: application/json'
-H "Authorization: Bearer ACCESS_TOKEN"

Reply

You can now use the authorised consent to get the user balance

curl -L 'https://monolay.io/v1/ais/aaklfgkla53450/balances' \
-H 'Accept: application/json'
-H "Authorization: Bearer ACCESS_TOKEN"

Reply